import {
    request
} from './request'

//获取歌曲下载url
export function getDownloadUrl(id) {
    return request({
        url: '/song/download/url',
        params: {
            id
        }
    })
}

//获取用户电台
export function getUserDj(uid) {
    return request({
        url: '/user/dj',
        params: {
            uid
        }
    })
}

//获取用户收藏专辑

export function getUserAlbum(limit, offset) {
    return request({
        url: '/album/sublist',
        params: {

            limit,
            offset
        }
    })
}

//收藏的歌手列表
export function getSingerCollect() {
    return request({
        url: '/artist/sublist',
        params: {

        }
    })
}
//收藏的mv列表
export function getVideoCollect() {
    return request({
        url: '/mv/sublist',
        params: {}
    })
}

//获取云盘数据
export function getCloudInfo() {
    return request({
        url: '/user/cloud',
        params: {}
    })
}

//获取云盘歌曲数据

export function getCloudMusic(id) {
    return request({
        url: '/user/cloud/detail',
        params: {
            id
        }
    })
}

//获取最火歌手
export function getRecSinger() {
    return request({
        url: '/top/artists',
        params: {

        }
    })
}

//获最新专辑
export function getNewAlbums() {
    return request({
        url: '/album/newest',
        params: {

        }
    })
}

//获取最新专辑列表
export function getNewAlbumsList(limit = 50) {
    return request({
        url: '/album/list',
        params: { limit }
    })
}


//获取歌手专辑
export function getSingerAlbums(id) {
    return request({
        url: '/artist/album',
        params: {
            id
        }
    })
}


//获取每日推荐
export function getDayMusic() {
    return request({
        url: '/recommend/songs',
        params: {

        }
    })
}

//获取私人fm
export function getPraviteFm() {
    return request({
        url: '/personal_fm',
        params: {

        }
    })
}
//关于歌手的一些功能

//获取歌手信息
export function getSingerInfo(id) {
    return request({
        url: '/artist/detail',
        params: {
            id
        }
    })
}

//获取歌手单曲
export function getSingerSongs(id) {
    return request({
        url: '/artists',
        params: {
            id
        }
    })
}

//获取相似歌手
export function getSingerSame(id) {
    return request({
        url: '/simi/artist',
        params: {
            id
        }
    })
}

//获取喜欢音乐列表
export function getUserLikeList(uid) {
    return request({
        url: '/likelist',
        params: {
            uid
        }
    })
}

//喜欢音乐
export function getMusicLike(id, like) {
    return request({
        url: '/like',
        params: {
            id,
            like
        }
    })
}

//获取音乐链接
export function getMusicUrl(id) {
    return request({
        url: '/song/url',
        params: {
            id
        }
    })
}
//获取歌曲信息
export function getMusicDetailList(ids) {
    return request({
        url: '/song/detail',
        params: {
            ids
        }
    })
}

//获取歌词
export function getLyric(id) {
    return request({
        url: '/lyric',
        params: {
            id
        }
    })
}